<template lang="pug">
  draggable(v-model="value.children" :options="dragOptions" @add="dragAdd")
    puligin-defs-item.plugin-defs-item(:editor="'true'" :key="one.config.componentId" v-for="one in value.children" :pluginDefsInfo="one" :siblings="value.children" :scope="scope")
</template>
<script>
import draggable from 'vuedraggable'
import puliginDefsItem from '../puliginDefsItem/puliginDefsItem'

export default {
  props: ['value', 'dragOptions', 'scope'],
  components: { puliginDefsItem, draggable },
  inject: ['rootForm'],
  data() {
    return {}
  },
  methods: {
    dragAdd(v) {
      this.rootForm.dragAdd(v)
    }
  }
}
</script>
